ten_things = "Apples Oranges Crows Telephone Light Sugar"

print("Wait there are not 10 things in that list. Let's fix that.")

stuff = ten_things.split(' ')
more_stuff = ["Day","Night","Song","Frisbee","Corn","Banana","Gril","Boy"]

#     6个元素
while len(stuff) != 10:
    next_one = more_stuff.pop()
    print("Adding:",next_one)
    stuff.append(next_one)
    print(f"There are {len(stuff)} items now.")

print("There we go:",stuff)

print("Let's do some things with stuff.")

print(stuff[1])
print(stuff[-1])# -1表示列表末尾元素
print(stuff.pop())
print(' '.join(stuff))# 通过空格符号连接元素序列生成新的字符串
print('#'.join(stuff[3:5]))# 通过#符号连接元素序列生成新的字符串   list[0:4]将列表中的0-3元素切片
# str = '$'.join(stuff)
# print(str)